//
//  NSObjectAdditions.h
//  Tint
//
//  Created by Kevin Wu on 2/22/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (Tint)

/*
 * Class string
 */
+ (NSString *)classString;
- (NSString *)classString;

/*
 * Associate object
 */
- (void)associateValue:(id)value withKey:(void *)key;
- (void)weaklyAssociateValue:(id)value withKey:(void *)key;
- (id)associatedValueForKey:(void *)key;

/*
 * KVC
 */
- (BOOL)isValueForKeyPath:(NSString *)keyPath equalToValue:(id)value;
- (BOOL)isValueForKeyPath:(NSString *)keyPath identicalToValue:(id)value;
+ (NSArray *)newPropertyNames;
+ (NSDictionary *)newPropertyAttributes;

/*
 * Sending messages
 * TODO: update implementation
 */
- (id)runSelector:(SEL)selector 
      withObjects:(NSArray *)objects;

- (id)runSelectorOnMainThread:(SEL)selector 
                  withObjects:(NSArray *)objects;


- (id)runSelector:(SEL)selector;

- (id)runSelector:(SEL)selector 
       withObject:(id)p1;

- (id)runSelector:(SEL)selector 
       withObject:(id)p1 
       withObject:(id)p2;

- (id)runSelector:(SEL)selector 
       withObject:(id)p1 
       withObject:(id)p2 
       withObject:(id)p3;

- (id)runSelector:(SEL)selector 
       withObject:(id)p1 
       withObject:(id)p2 
       withObject:(id)p3 
       withObject:(id)p4;

- (id)runSelector:(SEL)selector 
       withObject:(id)p1 
       withObject:(id)p2 
       withObject:(id)p3 
       withObject:(id)p4 
       withObject:(id)p5;

- (id)runSelector:(SEL)selector 
       withObject:(id)p1 
       withObject:(id)p2 
       withObject:(id)p3 
       withObject:(id)p4 
       withObject:(id)p5 
       withObject:(id)p6;


- (id)runSelectorOnMainThread:(SEL)selector;

- (id)runSelectorOnMainThread:(SEL)selector 
                   withObject:(id)p1;

- (id)runSelectorOnMainThread:(SEL)selector 
                   withObject:(id)p1 
                   withObject:(id)p2;

- (id)runSelectorOnMainThread:(SEL)selector 
                   withObject:(id)p1 
                   withObject:(id)p2 
                   withObject:(id)p3;

- (id)runSelectorOnMainThread:(SEL)selector 
                   withObject:(id)p1 
                   withObject:(id)p2 
                   withObject:(id)p3 
                   withObject:(id)p4;

- (id)runSelectorOnMainThread:(SEL)selector 
                   withObject:(id)p1 
                   withObject:(id)p2 
                   withObject:(id)p3 
                   withObject:(id)p4 
                   withObject:(id)p5;

- (id)runSelectorOnMainThread:(SEL)selector 
                   withObject:(id)p1 
                   withObject:(id)p2 
                   withObject:(id)p3 
                   withObject:(id)p4 
                   withObject:(id)p5 
                   withObject:(id)p6;

@end
